package com.hbt.user_upload_provider.controller;

import com.hbt.api.entity.CommonResult;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.awt.*;

@RestController
@RequestMapping("user_upload")
public class UserUploadController {
    @RequestMapping("test")
    public String test(){
        System.out.println("enter test");
        return "test success";
    }

    @RequestMapping(method = RequestMethod.POST,value = "uploadAvatar", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public CommonResult uploadAvatar(){
        System.out.println("enter UserUploadController uploadAvatar ");
//        if (file == null){
//            System.out.println("file == null");
//        }else {
//            System.out.println("file != null:"+file.getOriginalFilename());
//        }
        return null;
    }

}
